 	<!DOCTYPE html>
 	<html lang="en">
 	<head>
 	    <meta charset="UTF-8">
 	    <title>Document</title>
 	</head>
 	<body>
 	    <script>
 	    function Person(name,age){
 	         this.name = name
 	         this.age = age;
 	
 	     }
 	     function Student(grade){
 	         this.grade = grade;
 	        
 	    }
 	    /*
 	     原型对象
 	 通过函数对象的prototype属性访问到原型对象
 	 原型对象的成员可以被构造函数所创建的普通对象所继承
 	 普通对象继承构造函数原型对象
 	
 	     */
 	     var p=new Person('瑶瑶呀',18);
 	     Student.prototype=p;
 	     var s=new Student(2);
 	
 	     console.log(s.name);
 	  function Animal(name,leg){
 	        this.name = name;
 	        this.leg = leg;
 	
 	    }
 	    function Cat(eat){
        this.eat = eat;
 	
 	    }
 	   
 	    var a=new Animal('wangwang',4);
 	    Cat.prototype=a;
 	    var c=new Cat(2);
 	    console.log(c.name);
 	    </script>
 	</body>
 	</html>